<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qsgnode.cpp -->
  <title>QSGNode 类 | Qt Quick 5.12.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.12</a></td><td ><a href="qtquick-index.html">Qt Quick 模块</a></td><td ><a href="qtquick-module.html">C++ 类</a></td><td >QSGNode</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtquick-index.html">Qt 5.12.3 参考指南</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">目录</a></h3>
<ul>
<li class="level1"><a href="#public-types">公用类型</a></li>
<li class="level1"><a href="#public-functions">公用函数</a></li>
<li class="level1"><a href="#protected-variables">Protected Variables</a></li>
<li class="level1"><a href="#details">详细信息</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QSGNode 类</h1>
<!-- $$$QSGNode-brief -->
<p>The <a href="qsgnode.html">QSGNode</a> class is the base class for all nodes in the scene graph. <a href="#details">更多...</a></p>
<!-- @@@QSGNode -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign">头文件：</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QSGNode&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += quick</td></tr><tr><td class="memItemLeft rightAlign topAlign"> 被继承：</td><td class="memItemRight bottomAlign"> <p><a href="qsgbasicgeometrynode.html">QSGBasicGeometryNode</a>, <a href="qsgopacitynode.html">QSGOpacityNode</a>, <a href="qsgrendernode.html">QSGRenderNode</a>, and <a href="qsgtransformnode.html">QSGTransformNode</a></p>
</td></tr></table></div><ul>
<li><a href="qsgnode-members.html">所有成员的列表，包括继承成员</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">公用类型</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#DirtyStateBit-enum">DirtyState</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#DirtyStateBit-enum">DirtyStateBit</a></b> { DirtyMatrix, DirtyNodeAdded, DirtyNodeRemoved, DirtyGeometry, ..., DirtySubtreeBlocked }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#Flag-enum">Flag</a></b> { OwnedByParent, UsePreprocess, OwnsGeometry, OwnsMaterial, OwnsOpaqueMaterial, InternalReserved }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#Flag-enum">Flags</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#NodeType-enum">NodeType</a></b> { BasicNodeType, GeometryNodeType, TransformNodeType, ClipNodeType, OpacityNodeType, RenderNodeType }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">公用函数</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#QSGNode">QSGNode</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#dtor.QSGNode">~QSGNode</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#appendChildNode">appendChildNode</a></b>(QSGNode *<i>node</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode *</td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#childAtIndex">childAtIndex</a></b>(int <i>i</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#childCount">childCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode *</td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#firstChild">firstChild</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode::Flags </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#flags">flags</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#insertChildNodeAfter">insertChildNodeAfter</a></b>(QSGNode *<i>node</i>, QSGNode *<i>after</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#insertChildNodeBefore">insertChildNodeBefore</a></b>(QSGNode *<i>node</i>, QSGNode *<i>before</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#isSubtreeBlocked">isSubtreeBlocked</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode *</td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#lastChild">lastChild</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#markDirty">markDirty</a></b>(QSGNode::DirtyState <i>bits</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode *</td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#nextSibling">nextSibling</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode *</td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#parent">parent</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#prependChildNode">prependChildNode</a></b>(QSGNode *<i>node</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#preprocess">preprocess</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode *</td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#previousSibling">previousSibling</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#removeAllChildNodes">removeAllChildNodes</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#removeChildNode">removeChildNode</a></b>(QSGNode *<i>node</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#setFlag">setFlag</a></b>(QSGNode::Flag <i>f</i>, bool <i>enabled</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#setFlags">setFlags</a></b>(QSGNode::Flags <i>f</i>, bool <i>enabled</i> = true)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSGNode::NodeType </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#type">type</a></b>() const</td></tr>
</table></div>
<a name="protected-variables"></a>
<h2 id="protected-variables">Protected Variables</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qsgnode.html#d_ptr-var">d_ptr</a></b></td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QSGNode-description -->
<div class="descr">
<h2 id="details">详细信息</h2>
<p>The <a href="qsgnode.html">QSGNode</a> class is the base class for all nodes in the scene graph.</p>
<p>The <a href="qsgnode.html">QSGNode</a> class can be used as a child container. Children are added with the <a href="qsgnode.html#appendChildNode">appendChildNode</a>(), <a href="qsgnode.html#prependChildNode">prependChildNode</a>(), <a href="qsgnode.html#insertChildNodeBefore">insertChildNodeBefore</a>() and <a href="qsgnode.html#insertChildNodeAfter">insertChildNodeAfter</a>(). The order of nodes is important as geometry nodes are rendered according to their ordering in the scene graph.</p>
<p>The scene graph nodes contains a mechanism to describe which parts of the scene has changed. This includes the combined matrices, accumulated opacity, changes to the node hierarchy, and so on. This information can be used for optimizations inside the scene graph renderer. For the renderer to properly render the nodes, it is important that users call <a href="qsgnode.html#markDirty">QSGNode::markDirty</a>() with the correct flags when nodes are changed. Most of the functions on the node classes will implicitly call <a href="qsgnode.html#markDirty">markDirty</a>(). For example, <a href="qsgnode.html#appendChildNode">QSGNode::appendChildNode</a>() will call <a href="qsgnode.html#markDirty">markDirty</a>() passing in <a href="qsgnode.html#DirtyStateBit-enum">QSGNode::DirtyNodeAdded</a>.</p>
<p>If nodes change every frame, the <a href="qsgnode.html#preprocess">preprocess</a>() function can be used to apply changes to a node for every frame it is rendered. The use of <a href="qsgnode.html#preprocess">preprocess</a>() must be explicitly enabled by setting the <a href="qsgnode.html#Flag-enum">QSGNode::UsePreprocess</a> flag on the node.</p>
<p>The virtual <a href="qsgnode.html#isSubtreeBlocked">isSubtreeBlocked</a>() function can be used to disable a subtree all together. Nodes in a blocked subtree will not be preprocessed() and not rendered.</p>
<p><b>Note: </b>All classes with QSG prefix should be used solely on the scene graph's rendering thread. See <a href="qtquick-visualcanvas-scenegraph.html#scene-graph-and-rendering">Scene Graph and Rendering</a> for more information.</p></div>
<!-- @@@QSGNode -->
<div class="types">
<h2>成员类型文档</h2>
<!-- $$$DirtyStateBit$$$DirtySubtreeBlocked$$$DirtyMatrix$$$DirtyNodeAdded$$$DirtyNodeRemoved$$$DirtyGeometry$$$DirtyMaterial$$$DirtyOpacity$$$DirtyForceUpdate$$$DirtyUsePreprocess$$$DirtyPropagationMask -->
<h3 class="flags" id="DirtyStateBit-enum"><a name="DirtyStateBit-enum"></a>enum QSGNode::<span class="name">DirtyStateBit</span><br/>flags QSGNode::<span class="name">DirtyState</span></h3>
<p>Used in <a href="qsgnode.html#markDirty">QSGNode::markDirty</a>() to indicate how the scene graph has changed.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QSGNode::DirtyMatrix</code></td><td class="topAlign tblval"><code>0x0100</code></td><td class="topAlign">The matrix in a <a href="qsgtransformnode.html">QSGTransformNode</a> has changed.</td></tr>
<tr><td class="topAlign"><code>QSGNode::DirtyNodeAdded</code></td><td class="topAlign tblval"><code>0x0400</code></td><td class="topAlign">A node was added.</td></tr>
<tr><td class="topAlign"><code>QSGNode::DirtyNodeRemoved</code></td><td class="topAlign tblval"><code>0x0800</code></td><td class="topAlign">A node was removed.</td></tr>
<tr><td class="topAlign"><code>QSGNode::DirtyGeometry</code></td><td class="topAlign tblval"><code>0x1000</code></td><td class="topAlign">The geometry of a <a href="qsggeometrynode.html">QSGGeometryNode</a> has changed.</td></tr>
<tr><td class="topAlign"><code>QSGNode::DirtyMaterial</code></td><td class="topAlign tblval"><code>0x2000</code></td><td class="topAlign">The material of a <a href="qsggeometrynode.html">QSGGeometryNode</a> has changed.</td></tr>
<tr><td class="topAlign"><code>QSGNode::DirtyOpacity</code></td><td class="topAlign tblval"><code>0x4000</code></td><td class="topAlign">The opacity of a <a href="qsgopacitynode.html">QSGOpacityNode</a> has changed.</td></tr>
<tr><td class="topAlign"><code>QSGNode::DirtySubtreeBlocked</code></td><td class="topAlign tblval"><code>0x0080</code></td><td class="topAlign">The subtree has been blocked.</td></tr>
</table></div>
<p>The DirtyState type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;DirtyStateBit&gt;. It stores an OR combination of DirtyStateBit values.</p>
<p><b>请参考 </b><a href="qsgnode.html#markDirty">QSGNode::markDirty</a>()。</p>
<!-- @@@DirtyStateBit -->
<!-- $$$Flag$$$OwnedByParent$$$UsePreprocess$$$OwnsGeometry$$$OwnsMaterial$$$OwnsOpaqueMaterial$$$IsVisitableNode$$$InternalReserved -->
<h3 class="flags" id="Flag-enum"><a name="Flag-enum"></a>enum QSGNode::<span class="name">Flag</span><br/>flags QSGNode::<span class="name">Flags</span></h3>
<p>The QSGNode::Flag enum describes flags on the <a href="qsgnode.html">QSGNode</a></p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QSGNode::OwnedByParent</code></td><td class="topAlign tblval"><code>0x0001</code></td><td class="topAlign">The node is owned by its parent and will be deleted when the parent is deleted.</td></tr>
<tr><td class="topAlign"><code>QSGNode::UsePreprocess</code></td><td class="topAlign tblval"><code>0x0002</code></td><td class="topAlign">The node's virtual <a href="qsgnode.html#preprocess">preprocess</a>() function will be called before rendering starts.</td></tr>
<tr><td class="topAlign"><code>QSGNode::OwnsGeometry</code></td><td class="topAlign tblval"><code>0x00010000</code></td><td class="topAlign">Only valid for <a href="qsggeometrynode.html">QSGGeometryNode</a> and <a href="qsgclipnode.html">QSGClipNode</a>. The node has ownership over the <a href="qsggeometry.html">QSGGeometry</a> instance and will delete it when the node is destroyed or a geometry is assigned.</td></tr>
<tr><td class="topAlign"><code>QSGNode::OwnsMaterial</code></td><td class="topAlign tblval"><code>0x00020000</code></td><td class="topAlign">Only valid for <a href="qsggeometrynode.html">QSGGeometryNode</a>. The node has ownership over the material and will delete it when the node is destroyed or a material is assigned.</td></tr>
<tr><td class="topAlign"><code>QSGNode::OwnsOpaqueMaterial</code></td><td class="topAlign tblval"><code>0x00040000</code></td><td class="topAlign">Only valid for <a href="qsggeometrynode.html">QSGGeometryNode</a>. The node has ownership over the opaque material and will delete it when the node is destroyed or a material is assigned.</td></tr>
<tr><td class="topAlign"><code>QSGNode::InternalReserved</code></td><td class="topAlign tblval"><code>0x01000000</code></td><td class="topAlign">Reserved for internal use.</td></tr>
</table></div>
<p>The Flags type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;Flag&gt;. It stores an OR combination of Flag values.</p>
<!-- @@@Flag -->
<!-- $$$NodeType$$$BasicNodeType$$$GeometryNodeType$$$TransformNodeType$$$ClipNodeType$$$OpacityNodeType$$$RootNodeType$$$RenderNodeType -->
<h3 class="fn" id="NodeType-enum"><a name="NodeType-enum"></a>enum QSGNode::<span class="name">NodeType</span></h3>
<p>Can be used to figure out the type of node.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QSGNode::BasicNodeType</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The type of <a href="qsgnode.html">QSGNode</a></td></tr>
<tr><td class="topAlign"><code>QSGNode::GeometryNodeType</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The type of <a href="qsggeometrynode.html">QSGGeometryNode</a></td></tr>
<tr><td class="topAlign"><code>QSGNode::TransformNodeType</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The type of <a href="qsgtransformnode.html">QSGTransformNode</a></td></tr>
<tr><td class="topAlign"><code>QSGNode::ClipNodeType</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The type of <a href="qsgclipnode.html">QSGClipNode</a></td></tr>
<tr><td class="topAlign"><code>QSGNode::OpacityNodeType</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The type of <a href="qsgopacitynode.html">QSGOpacityNode</a></td></tr>
<tr><td class="topAlign"><code>QSGNode::RenderNodeType</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The type of <a href="qsgrendernode.html">QSGRenderNode</a></td></tr>
</table></div>
<p><b>请参考 </b><a href="qsgnode.html#type">type</a>()。</p>
<!-- @@@NodeType -->
</div>
<div class="func">
<h2>成员函数文档</h2>
<!-- $$$QSGNode[overload1]$$$QSGNode -->
<h3 class="fn" id="QSGNode"><a name="QSGNode"></a>QSGNode::<span class="name">QSGNode</span>()</h3>
<p>Constructs a new node</p>
<!-- @@@QSGNode -->
<!-- $$$~QSGNode[overload1]$$$~QSGNode -->
<h3 class="fn" id="dtor.QSGNode"><a name="dtor.QSGNode"></a><code>[virtual] </code>QSGNode::<span class="name">~QSGNode</span>()</h3>
<p>Destroys the node.</p>
<p>Every child of this node that has the flag <a href="qsgnode.html#Flag-enum">QSGNode::OwnedByParent</a> set, will also be deleted.</p>
<!-- @@@~QSGNode -->
<!-- $$$appendChildNode[overload1]$$$appendChildNodeQSGNode* -->
<h3 class="fn" id="appendChildNode"><a name="appendChildNode"></a><span class="type">void</span> QSGNode::<span class="name">appendChildNode</span>(<span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *<i>node</i>)</h3>
<p>Appends <i>node</i> to this node's list of children.</p>
<p>Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.</p>
<!-- @@@appendChildNode -->
<!-- $$$childAtIndex[overload1]$$$childAtIndexint -->
<h3 class="fn" id="childAtIndex"><a name="childAtIndex"></a><span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *QSGNode::<span class="name">childAtIndex</span>(<span class="type">int</span> <i>i</i>) const</h3>
<p>Returns the child at index <i>i</i>.</p>
<p>Children are stored internally as a linked list, so iterating over the children via the index is suboptimal.</p>
<!-- @@@childAtIndex -->
<!-- $$$childCount[overload1]$$$childCount -->
<h3 class="fn" id="childCount"><a name="childCount"></a><span class="type">int</span> QSGNode::<span class="name">childCount</span>() const</h3>
<p>Returns the number of child nodes.</p>
<!-- @@@childCount -->
<!-- $$$firstChild[overload1]$$$firstChild -->
<h3 class="fn" id="firstChild"><a name="firstChild"></a><span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *QSGNode::<span class="name">firstChild</span>() const</h3>
<p>Returns the first child of this node.</p>
<p>The children are stored in a linked list.</p>
<!-- @@@firstChild -->
<!-- $$$flags[overload1]$$$flags -->
<h3 class="fn" id="flags"><a name="flags"></a><span class="type"><a href="qsgnode.html#Flag-enum">QSGNode::Flags</a></span> QSGNode::<span class="name">flags</span>() const</h3>
<p>Returns the set of flags for this node.</p>
<p><b>请参考 </b><a href="qsgnode.html#setFlags">setFlags</a>()。</p>
<!-- @@@flags -->
<!-- $$$insertChildNodeAfter[overload1]$$$insertChildNodeAfterQSGNode*QSGNode* -->
<h3 class="fn" id="insertChildNodeAfter"><a name="insertChildNodeAfter"></a><span class="type">void</span> QSGNode::<span class="name">insertChildNodeAfter</span>(<span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *<i>node</i>, <span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *<i>after</i>)</h3>
<p>Inserts <i>node</i> to this node's list of children after the node specified with <i>after</i>.</p>
<p>Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.</p>
<!-- @@@insertChildNodeAfter -->
<!-- $$$insertChildNodeBefore[overload1]$$$insertChildNodeBeforeQSGNode*QSGNode* -->
<h3 class="fn" id="insertChildNodeBefore"><a name="insertChildNodeBefore"></a><span class="type">void</span> QSGNode::<span class="name">insertChildNodeBefore</span>(<span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *<i>node</i>, <span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *<i>before</i>)</h3>
<p>Inserts <i>node</i> to this node's list of children before the node specified with <i>before</i>.</p>
<p>Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.</p>
<!-- @@@insertChildNodeBefore -->
<!-- $$$isSubtreeBlocked[overload1]$$$isSubtreeBlocked -->
<h3 class="fn" id="isSubtreeBlocked"><a name="isSubtreeBlocked"></a><code>[virtual] </code><span class="type">bool</span> QSGNode::<span class="name">isSubtreeBlocked</span>() const</h3>
<p>Returns whether this node and its subtree is available for use.</p>
<p>Blocked subtrees will not get their dirty states updated and they will not be rendered.</p>
<p>The <a href="qsgopacitynode.html">QSGOpacityNode</a> will return a blocked subtree when accumulated opacity is 0, for instance.</p>
<!-- @@@isSubtreeBlocked -->
<!-- $$$lastChild[overload1]$$$lastChild -->
<h3 class="fn" id="lastChild"><a name="lastChild"></a><span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *QSGNode::<span class="name">lastChild</span>() const</h3>
<p>Returns the last child of this node.</p>
<p>The children are stored as a linked list.</p>
<!-- @@@lastChild -->
<!-- $$$markDirty[overload1]$$$markDirtyQSGNode::DirtyState -->
<h3 class="fn" id="markDirty"><a name="markDirty"></a><span class="type">void</span> QSGNode::<span class="name">markDirty</span>(<span class="type"><a href="qsgnode.html#DirtyStateBit-enum">QSGNode::DirtyState</a></span> <i>bits</i>)</h3>
<p>Notifies all connected renderers that the node has dirty <i>bits</i>.</p>
<!-- @@@markDirty -->
<!-- $$$nextSibling[overload1]$$$nextSibling -->
<h3 class="fn" id="nextSibling"><a name="nextSibling"></a><span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *QSGNode::<span class="name">nextSibling</span>() const</h3>
<p>Returns the node after this in the parent's list of children.</p>
<p>The children are stored as a linked list.</p>
<!-- @@@nextSibling -->
<!-- $$$parent[overload1]$$$parent -->
<h3 class="fn" id="parent"><a name="parent"></a><span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *QSGNode::<span class="name">parent</span>() const</h3>
<p>Returns the parent node of this node.</p>
<!-- @@@parent -->
<!-- $$$prependChildNode[overload1]$$$prependChildNodeQSGNode* -->
<h3 class="fn" id="prependChildNode"><a name="prependChildNode"></a><span class="type">void</span> QSGNode::<span class="name">prependChildNode</span>(<span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *<i>node</i>)</h3>
<p>Prepends <i>node</i> to this node's the list of children.</p>
<p>Ordering of nodes is important as geometry nodes will be rendered in the order they are added to the scene graph.</p>
<!-- @@@prependChildNode -->
<!-- $$$preprocess[overload1]$$$preprocess -->
<h3 class="fn" id="preprocess"><a name="preprocess"></a><code>[virtual] </code><span class="type">void</span> QSGNode::<span class="name">preprocess</span>()</h3>
<p>Override this function to do processing on the node before it is rendered.</p>
<p>Preprocessing needs to be explicitly enabled by setting the flag <a href="qsgnode.html#Flag-enum">QSGNode::UsePreprocess</a>. The flag needs to be set before the node is added to the scene graph and will cause the preprocess() function to be called for every frame the node is rendered.</p>
<p><b>Warning:</b> Beware of deleting nodes while they are being preprocessed. It is possible, with a small performance hit, to delete a single node during its own preprocess call. Deleting a subtree which has nodes that also use preprocessing may result in a segmentation fault. This is done for performance reasons.</p>
<!-- @@@preprocess -->
<!-- $$$previousSibling[overload1]$$$previousSibling -->
<h3 class="fn" id="previousSibling"><a name="previousSibling"></a><span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *QSGNode::<span class="name">previousSibling</span>() const</h3>
<p>Returns the node before this in the parent's list of children.</p>
<p>The children are stored as a linked list.</p>
<!-- @@@previousSibling -->
<!-- $$$removeAllChildNodes[overload1]$$$removeAllChildNodes -->
<h3 class="fn" id="removeAllChildNodes"><a name="removeAllChildNodes"></a><span class="type">void</span> QSGNode::<span class="name">removeAllChildNodes</span>()</h3>
<p>Removes all child nodes from this node's list of children.</p>
<!-- @@@removeAllChildNodes -->
<!-- $$$removeChildNode[overload1]$$$removeChildNodeQSGNode* -->
<h3 class="fn" id="removeChildNode"><a name="removeChildNode"></a><span class="type">void</span> QSGNode::<span class="name">removeChildNode</span>(<span class="type"><a href="qsgnode.html#QSGNode">QSGNode</a></span> *<i>node</i>)</h3>
<p>Removes <i>node</i> from this node's list of children.</p>
<!-- @@@removeChildNode -->
<!-- $$$setFlag[overload1]$$$setFlagQSGNode::Flagbool -->
<h3 class="fn" id="setFlag"><a name="setFlag"></a><span class="type">void</span> QSGNode::<span class="name">setFlag</span>(<span class="type"><a href="qsgnode.html#Flag-enum">QSGNode::Flag</a></span> <i>f</i>, <span class="type">bool</span> <i>enabled</i> = true)</h3>
<p>Sets the flag <i>f</i> on this node if <i>enabled</i> is true; otherwise clears the flag.</p>
<p><b>请参考 </b><a href="qsgnode.html#flags">flags</a>()。</p>
<!-- @@@setFlag -->
<!-- $$$setFlags[overload1]$$$setFlagsQSGNode::Flagsbool -->
<h3 class="fn" id="setFlags"><a name="setFlags"></a><span class="type">void</span> QSGNode::<span class="name">setFlags</span>(<span class="type"><a href="qsgnode.html#Flag-enum">QSGNode::Flags</a></span> <i>f</i>, <span class="type">bool</span> <i>enabled</i> = true)</h3>
<p>Sets the flags <i>f</i> on this node if <i>enabled</i> is true; otherwise clears the flags.</p>
<p><b>请参考 </b><a href="qsgnode.html#flags">flags</a>()。</p>
<!-- @@@setFlags -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><span class="type"><a href="qsgnode.html#NodeType-enum">QSGNode::NodeType</a></span> QSGNode::<span class="name">type</span>() const</h3>
<p>Returns the type of this node. The node type must be one of the predefined types defined in <a href="qsgnode.html#NodeType-enum">QSGNode::NodeType</a> and can safely be used to cast to the corresponding class.</p>
<!-- @@@type -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
